package com.lywz.web.action.hotel;

import java.util.Collection;

import com.lywz.biz.common.entity.hotel.Hotel;
import com.lywz.biz.common.enums.Country;
import com.lywz.web.struts.GZAbstracterAction;

/**
 * @author Sunna ming
 * @datetime 2010-5-7 下午11:22:33
 */
public class ShowHotelInfoAction extends GZAbstracterAction {

    private static final long serialVersionUID = -3735009647103636076L;

    /** 酒店主键 */
    private int hotelId;

    /** 酒店所属景区主键 */
    private int scenicId;

    /** 酒店所属城市主键 */
    private int cityId;

    /** 酒店所属区县主键 */
    private int countryId;

    /** 酒店名字 */
    private String name;

    /** 酒店类型 */
    private int type;

    /** 酒店价格区间起始价格 */
    private int bprize;

    /** 酒店价格区间终止价格 */
    private int ePrize;

    /** 分页其实位置（从0开始） */
    private int first;

    /** 分页每页最大记录数 */
    private int max;

    /** 区县of城市*/
    private Collection<Country> countryList;

    /** 单个酒店 */
    private Hotel oneHotel;

    /** 城市内酒店 */
    private Collection<Hotel> hotelsOfCity;

    /** 景区内酒店 */
    private Collection<Hotel> hotelsOfScenic;

    /** 组合条件下酒店 */
    private Collection<Hotel> hotelsOfComposeSearch;

    /** 按照HotelId查询酒店信息 */
    public String getOneByHotelId() {
        oneHotel = hotelService.queryHotelByHotelId(hotelId);
        return SUCCESS;
    }

    /** 按照城市Id查询酒店信息 */
    public String getHotelsByCityId() {
        hotelsOfCity = hotelService.queryHotelsByCityId(cityId, first, max);
        return SUCCESS;
    }

    /** 按照景区Id查询酒店信息 */
    public String getHotelsByScenicId() {
        hotelsOfScenic = hotelService.queryHotelsByScenicId(scenicId, first, max);
        return SUCCESS;
    }

    /** 按照组合条件查询酒店信息 */
    public String getHotelsByCompose() {
        countryList = Country.valueOfByCityId(cityId);
        hotelsOfComposeSearch = hotelService.queryHotelsByCompose(cityId, countryId, name, type,
                bprize, ePrize, first, max);
        return SUCCESS;
    }

    /////////////////// getter and setter ////////////////
    public int getHotelId() {
        return hotelId;
    }

    public void setHotelId(int hotelId) {
        this.hotelId = hotelId;
    }

    public int getScenicId() {
        return scenicId;
    }

    public void setScenicId(int scenicId) {
        this.scenicId = scenicId;
    }

    public int getCityId() {
        return cityId;
    }

    public void setCityId(int cityId) {
        this.cityId = cityId;
    }

    public int getCountryId() {
        return countryId;
    }

    public void setCountryId(int countryId) {
        this.countryId = countryId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getBprize() {
        return bprize;
    }

    public void setBprize(int bprize) {
        this.bprize = bprize;
    }

    public int getePrize() {
        return ePrize;
    }

    public void setePrize(int ePrize) {
        this.ePrize = ePrize;
    }

    public int getFirst() {
        return first;
    }

    public void setFirst(int first) {
        this.first = first;
    }

    public int getMax() {
        return max;
    }

    public void setMax(int max) {
        this.max = max;
    }

    public Collection<Country> getCountryList() {
        return countryList;
    }

    public void setCountryList(Collection<Country> countryList) {
        this.countryList = countryList;
    }

    public Hotel getOneHotel() {
        return oneHotel;
    }

    public void setOneHotel(Hotel oneHotel) {
        this.oneHotel = oneHotel;
    }

    public Collection<Hotel> getHotelsOfCity() {
        return hotelsOfCity;
    }

    public void setHotelsOfCity(Collection<Hotel> hotelsOfCity) {
        this.hotelsOfCity = hotelsOfCity;
    }

    public Collection<Hotel> getHotelsOfScenic() {
        return hotelsOfScenic;
    }

    public void setHotelsOfScenic(Collection<Hotel> hotelsOfScenic) {
        this.hotelsOfScenic = hotelsOfScenic;
    }

    public Collection<Hotel> getHotelsOfComposeSearch() {
        return hotelsOfComposeSearch;
    }

    public void setHotelsOfComposeSearch(Collection<Hotel> hotelsOfComposeSearch) {
        this.hotelsOfComposeSearch = hotelsOfComposeSearch;
    }

}
